
// This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013
{$CLEO .cs}

//-------------MAIN---------------
thread 'GANG1'
0AC6: 18@ = label @actor offset 
0AC6: 19@ = label @marker offset
0ADF: add_dynamic_GXT_entry "gang0" text "gang wars extended v5.0" 
0ADF: add_dynamic_GXT_entry "gang1" text "wave ~1~ / ~1~" 
0ADF: add_dynamic_GXT_entry "gang2" text "anemy kills ~1~ / ~1~"
0ADF: add_dynamic_GXT_entry "zog" text "war in zone"
0ADF: add_dynamic_GXT_entry "WELC" text "~G~~H~WELCOME TO GANG WARS V4 ~R~~H~GET ATTACK GANG ~Y~~H~BY FAN SCRIPT HAVE FUN" 
00BA: show_text_styled GXT 'WELC' time 8000 style 1 
0AF1: write_int 0 to_ini_file "CLEO\POZIT.INI" section "WARS_V4" key "KEY" 

repeat 
wait 0
until if Player.Defined(0)
if 
  $ONMISSION == 0
then
else
end_thread

end
0AF1: write_int 0 to_ini_file "CLEO\POZIT.INI" section "WARS_V4" key "KEY" 
0AF1: write_int 0 to_ini_file "CLEO\GANG_WARS_V3\WARS_SET.INI" section "MODE5" key "KEY" 
0AF1: write_int 0 to_ini_file "CLEO\GANG_WARS_V3\WARS_SET.INI" section "MODE6" key "KEY" 
jump @GANG_WARS_V4_35D 

:GANG_WARS_V4_35D
wait 5 
while true
    repeat
    wait 0
    until if Player.Defined($PLAYER_CHAR)
    0AF0: 9@ = get_int_from_ini_file "CLEO\POZIT.INI" section "WARS_V4" key "KEY" 
    if 9@ == 1
    then
        0ACD: show_text_highpriority "~R~~H~SCRIPT UNLOADING" time 9000
        end_thread
    end
    Actor.StorePos($PLAYER_ACTOR, 0@, 1@, 2@)
    if  and
         not actor.Driving($PLAYER_ACTOR)
         0AE1: 10@ = random_actor_near_point 0@ 1@ 2@ in_radius 800.0 find_next 1 pass_deads 0 //IF and SET 
    then
        if 
             not 10@ == -1 
        then
            if or
                Actor.Model(10@) == #BALLAS1
                Actor.Model(10@) == #BALLAS2
                Actor.Model(10@) == #BALLAS3
            then
                if and
                    051A:   actor 10@ damaged_by_actor $PLAYER_ACTOR 
                    Actor.Dead(10@)
                then
                    1@ = #BALLAS1
                    2@ = #BALLAS3
                    00BA: show_text_styled GXT 'GWARS' time 5000 style 1 
                    
                    0AF1: write_int 102 to_ini_file "CLEO\GANG_WARS_V3\WARS_SET.INI" section "MODE1" key "KEY" 
                    0AF1: write_int 103 to_ini_file "CLEO\GANG_WARS_V3\WARS_SET.INI" section "MODE2" key "KEY" 
                    0AF1: write_int 104 to_ini_file "CLEO\GANG_WARS_V3\WARS_SET.INI" section "MODE3" key "KEY" 
                    0AF1: write_int -16711681 to_ini_file "CLEO\GANG_WARS_V3\WARS_SET.INI" section "MODE4" key "KEY" 
                    13@ = -16711681 
                    jump @start2
                end
            end
            if or
                Actor.Model(10@) == #LSV1
                Actor.Model(10@) == #LSV2
                Actor.Model(10@) == #LSV3
            then
                if and
                    051A:   actor 10@ damaged_by_actor $PLAYER_ACTOR 
                    Actor.Dead(10@)
                then
                    1@ = #LSV1
                    2@ = #LSV3
                    00BA: show_text_styled GXT 'GWARS' time 5000 style 1 
                    
                    0AF1: write_int 108 to_ini_file "CLEO\GANG_WARS_V3\WARS_SET.INI" section "MODE1" key "KEY" 
                    0AF1: write_int 109 to_ini_file "CLEO\GANG_WARS_V3\WARS_SET.INI" section "MODE2" key "KEY" 
                    0AF1: write_int 110 to_ini_file "CLEO\GANG_WARS_V3\WARS_SET.INI" section "MODE3" key "KEY" 
                    0AF1: write_int -65281 to_ini_file "CLEO\GANG_WARS_V3\WARS_SET.INI" section "MODE4" key "KEY" 
                    13@ = -65281 
                    jump @start2
                end
            end
            if or
                Actor.Model(10@) == #VLA1
                Actor.Model(10@) == #VLA2
                Actor.Model(10@) == #VLA3
            then
                if and
                    051A:   actor 10@ damaged_by_actor $PLAYER_ACTOR 
                    Actor.Dead(10@)
                then
                    1@ = #VLA1
                    2@ = #VLA3
                    00BA: show_text_styled GXT 'GWARS' time 5000 style 1                                            
                                                                                                           
                    0AF1: write_int 114 to_ini_file "CLEO\GANG_WARS_V3\WARS_SET.INI" section "MODE1" key "KEY"      
                    0AF1: write_int 115 to_ini_file "CLEO\GANG_WARS_V3\WARS_SET.INI" section "MODE2" key "KEY"      
                    0AF1: write_int 116 to_ini_file "CLEO\GANG_WARS_V3\WARS_SET.INI" section "MODE3" key "KEY"      
                    0AF1: write_int 16768190 to_ini_file "CLEO\GANG_WARS_V3\WARS_SET.INI" section "MODE4" key "KEY" 
                    13@ = 16768190                                                                                  
                    jump @start2
                end
            end
            if or
                Actor.Model(10@) == #DNB1
                Actor.Model(10@) == #DNB2
                Actor.Model(10@) == #DNB3
            then
                if and
                    051A:   actor 10@ damaged_by_actor $PLAYER_ACTOR 
                    Actor.Dead(10@)
                then
                    1@ = #DNB1
                    2@ = #DNB3
                    00BA: show_text_styled GXT 'GWARS' time 5000 style 1                                          
                                                                                                      
                    0AF1: write_int 121 to_ini_file "CLEO\GANG_WARS_V3\WARS_SET.INI" section "MODE1" key "KEY"    
                    0AF1: write_int 122 to_ini_file "CLEO\GANG_WARS_V3\WARS_SET.INI" section "MODE2" key "KEY"    
                    0AF1: write_int 123 to_ini_file "CLEO\GANG_WARS_V3\WARS_SET.INI" section "MODE3" key "KEY"    
                    0AF1: write_int -1 to_ini_file "CLEO\GANG_WARS_V3\WARS_SET.INI" section "MODE4" key "KEY"     
                    13@ = -1                                                                                      
                    jump @start2
                end
            end
            if or
                Actor.Model(10@) == #SFR1 
                Actor.Model(10@) == #SFR2 
                Actor.Model(10@) == #SFR3 
            then
                if and
                    051A:   actor 10@ damaged_by_actor $PLAYER_ACTOR 
                    Actor.Dead(10@)
                then
                    1@ = #SFR1
                    2@ = #SFR3
                    00BA: show_text_styled GXT 'GWARS' time 5000 style 1                                                  
                                                                                                                 
                    0AF1: write_int 173 to_ini_file "CLEO\GANG_WARS_V3\WARS_SET.INI" section "MODE1" key "KEY"            
                    0AF1: write_int 174 to_ini_file "CLEO\GANG_WARS_V3\WARS_SET.INI" section "MODE2" key "KEY"            
                    0AF1: write_int 175 to_ini_file "CLEO\GANG_WARS_V3\WARS_SET.INI" section "MODE3" key "KEY"            
                    0AF1: write_int 13158600 to_ini_file "CLEO\GANG_WARS_V3\WARS_SET.INI" section "MODE4" key "KEY"       
                    13@ = 13158600                                                                                        
                    jump @start2
                end
            end
            if or
                Actor.Model(10@) == #TRIADA    
                Actor.Model(10@) == #TRIADB    
                Actor.Model(10@) == #TRIBOSS   
            then
                if and
                    051A:   actor 10@ damaged_by_actor $PLAYER_ACTOR 
                    Actor.Dead(10@)
                then
                    1@ = #TRIADA
                    2@ = #TRIADB
                    00BA: show_text_styled GXT 'GWARS' time 5000 style 1                                        
                                                                                                       
                    0AF1: write_int 117 to_ini_file "CLEO\GANG_WARS_V3\WARS_SET.INI" section "MODE1" key "KEY"  
                    0AF1: write_int 118 to_ini_file "CLEO\GANG_WARS_V3\WARS_SET.INI" section "MODE2" key "KEY"  
                    0AF1: write_int 120 to_ini_file "CLEO\GANG_WARS_V3\WARS_SET.INI" section "MODE3" key "KEY"  
                    0AF1: write_int 0 to_ini_file "CLEO\GANG_WARS_V3\WARS_SET.INI" section "MODE4" key "KEY"    
                    13@ = 0                                                                                     
                    jump @start2
                end
            end
        end
    end
    
end
    
:start2

wait 0 
01F0: set_max_wanted_level_to 0 //disable cops
wait 0 
Model.Load(#GUN_DILDO1)
Model.Load(#GUN_DILDO2)
Model.Load(#GUN_VIBE1)
Model.Load(#GUN_VIBE2)
Model.Load(#FLOWERA)
Model.Load(#GUN_CANE)
Model.Load(#BRASSKNUCKLE)
Model.Load(#GOLFCLUB)
Model.Load(#NITESTICK)
Model.Load(#KNIFECUR)
Model.Load(#BAT)
Model.Load(#SHOVEL)
Model.Load(#POOLCUE)
Model.Load(#KATANA)
Model.Load(#CHNSAW)
Model.Load(#NVGOGGLES)
Model.Load(#IRGOGGLES)
Model.Load(#GUN_PARA)
Model.Load(#CAMERA)
Model.Load(#FIRE_EX)
Model.Load(#AK47)
Model.Load(#M4)
Model.Load(#SNIPER)
Model.Load(#cuntGUN)
Model.Load(#MICRO_UZI)
Model.Load(#SHOTGSPA)
Model.Load(#TEC9)
Model.Load(#MP5LNG)
Model.Load(#SAWNOFF)
Model.Load(#COLT45)
Model.Load(#SILENCED)
Model.Load(#DESERT_EAGLE)
Model.Load(#CHROMEGUN)
Model.Load(#SPRAYCAN)
Model.Load(#HEATSEEK)
Model.Load(#ROCKETLA)
Model.Load(#MINIGUN)
Model.Load(#FLAME)
Model.Load(#GRENADE)
Model.Load(#TEARGAS)
Model.Load(#MOLOTOV) 

if and
   Model.Available(#MINIGUN)
   Model.Available(#ROCKETLA)
   Model.Available(#SNIPER)
then 
    if and
        Model.Available(#M4)
        Model.Available(#TEC9)
        Model.Available(#SAWNOFF)
        Model.Available(#BAT)
        Model.Available(#KNIFECUR)
    then 
        if and
            Model.Available(#GRENADE)
            Model.Available(#TEARGAS)
            Model.Available(#MOLOTOV)
            Model.Available(#AK47)
            Model.Available(#COLT45)
            Model.Available(#CHROMEGUN)
            Model.Available(#MICRO_UZI)
            Model.Available(#MP5LNG)
        then
            
            22@ = 0
            23@ = 1
            24@ = 30
            26@ = 30
            27@ = 100
            29@ = 8
            28@ = 60
            20@ = 0
            14@ = 25
            else
            end_thread 
        end
    end
end
//continue
:if_next3
for 20@ = 0 to 239 step 4
0208: 3@ = random_float_in_ranges 1.0 70.0 
0208: 4@ = random_float_in_ranges 100.0 200.0 
04C4: store_coords_to 5@ 6@ 7@ from_actor $PLAYER_ACTOR with_offset 3@ 4@ 1.0 
04D3: get_nearest_car_path_coords_from 5@ 6@ 7@ type 2 store_to 5@ 6@ 7@
0208: 12@ = random_float_in_ranges 1@ 2@ 
Model.Load(12@)
038B: load_requested_models 
wait 100 
8@ = Actor.Create(Gang1, 12@, 5@, 6@, 7@)
Actor.Angle(8@) = 88.36082
Actor.Health(8@) = 27@
0209: 25@ = random_int_in_ranges 16 14@
if or
    25@ == 19 
    25@ == 20 
    25@ == 21 
    25@ == 39 
    25@ == 40 
    25@ == 44 
    25@ == 45 
then 
   0209: 25@ = random_int_in_ranges 22 14@
end
Actor.GiveWeaponAndAmmo(8@, 25@, 15@)
11@ = Marker.CreateAboveActor(8@)
Marker.SetIconSize(11@, 2)
Marker.SetColor(11@, 13@)
07DD: set_actor 8@ attack_rate 26@ // previously known as temper_to 
Actor.WeaponAccuracy(8@) = 24@
077A: set_actor 8@ acquaintance 4 to_actors_pedtype 0 // see ped.dat 
05E2: AS_actor 8@ kill_actor $PLAYER_ACTOR
0A8E: 16@ = 18@ + 20@ // label offset + item offset
0A8E: 17@ = 19@ + 20@ // label offset + item offset 
0A8C: write_memory 16@ size 4 value 8@ virtual_protect 0
0A8C: write_memory 17@ size 4 value 11@ virtual_protect 0
end

while true
    wait 0
      20@ += 4
      if 20@ > 239
      then
          20@ = 0
      end
    
        0A8E: 16@ = 18@ + 20@ // label offset + item offset
        0A8E: 17@ = 19@ + 20@ // label offset + item offset
        0A8D: 8@ = read_memory 16@ size 4 virtual_protect 0
        0A8D: 11@ = read_memory 17@ size 4 virtual_protect 0
        if 
            not actor.Dead(8@)
        then
            else if 056D:   actor 8@ defined 
            then 
                Actor.RemoveReferences(8@)
                wait 50
                actor.DestroyInstantly(8@)
                22@ += 1
            end        
        end
        03F0: enable_text_draw 0
        wait 5 
        0340: set_text_draw_RGBA 0 252 252 255 
        033F: set_text_draw_letter_size 0.3 0.8 
        033E: set_draw_text_position 23.0 197.0 GXT "gang0" 
        0340: set_text_draw_RGBA 124 252 124 255 
        033F: set_text_draw_letter_size 0.3 0.8 
        045B: draw_text_2numbers 23.0 215.0 GXT "gang1" numbers 23@ 29@
        0340: set_text_draw_RGBA 255 252 124 255 
        033F: set_text_draw_letter_size 0.3 0.8 
        045B: draw_text_2numbers 23.0 224.0 GXT "gang2" numbers 22@ 28@
        Actor.StorePos($PLAYER_ACTOR, 0@, 10@, 21@)
        08F1: get_zone_at 0@ 10@ 21@ nameB_to 24@s // 8-byte string
        0ADF: add_dynamic_GXT_entry "zox" text 24@s
        0340: set_text_draw_RGBA 0 252 252 255 
        033F: set_text_draw_letter_size 0.3 0.8 
        033E: set_draw_text_position 23.0 233.0 GXT "zog"
        0340: set_text_draw_RGBA 252 200 20 255 
        033F: set_text_draw_letter_size 0.3 0.8 
        033E: set_draw_text_position 128.0 233.0 GXT "zox"
        0AF0: 9@ = get_int_from_ini_file "CLEO\POZIT.INI" section "WARS_V4" key "KEY" 
        if or
            9@ == 1 
            0741:   actor $PLAYER_ACTOR busted 
            wasted_or_busted 
            Player.Wasted(0)
            //$ONMISSION == 1 
            003B:   23@ == 29@ // (int) 
        then
            00BA: show_text_styled GXT 'GWARG' time 5000 style 1 
            
            goto @clean5
        end
        if 
            22@ >= 60
        then 
            23@ += 1
            24@ += 10
            if not 14@ >= 38
            then
                14@ += 2 //upgrade weapon id
            end
            26@ += 10
            27@ += 10
            22@ = 0
            00BA: show_text_styled GXT 'GWARN' time 5000 style 1 
            wait 2000 
            0AF1: write_int 1 to_ini_file "CLEO\GANG_WARS_V3\WARS_SET.INI" section "MODE5" key "KEY" 
            wait 50 
            0AF1: write_int 0 to_ini_file "CLEO\GANG_WARS_V3\WARS_SET.INI" section "MODE5" key "KEY" 
            wait 0
            076A: set_zone 24@s dealer_density_to 255
            076C: set_zone 24@s gang 1 density_to 255
            0767: set_zone 24@s popcycle_group_for_peds_and_cars_to 0  // Estaoo Market
            0874: set_zone 24@s popcycle_group_for_peds_to 0
            08AC: hide_gang_zones_on_map 0
            090D: highlight_all_inactive_gang_zones_as_available_for_gangwars
            goto @if_next3
        end
        if 23@ == 1
        then
            0AAA: 30@ = thread 'HATEG' pointer 
            if 
                30@ == 0 
            then 
                0A92: create_custom_thread "CLEO/GANG_WARS_V3\HATEG.CS"  
            end
        end
        if 23@ == 2
        then
            0AAA: 31@ = thread 'HATE1' pointer 
            if 
                31@ == 0 
            then 
                0A92: create_custom_thread "CLEO/GANG_WARS_V3\HATE1.CS"  
                0A92: create_custom_thread "CLEO/GANG_WARS_V3\HATE1.CS"  
            end
        end
        if 23@ == 3
        then
            0AAA: 31@ = thread 'HATE1' pointer 
            if 
                31@ == 0 
            then 
                0A92: create_custom_thread "CLEO/GANG_WARS_V3\HATE1.CS"  
                0A92: create_custom_thread "CLEO/GANG_WARS_V3\HATE1.CS"   
            end
        end
        if 23@ == 4
        then
            0AAA: 31@ = thread 'HATE1' pointer 
            if 
                31@ == 0 
            then 
                0A92: create_custom_thread "CLEO/GANG_WARS_V3\HATE1.CS"  
                0A92: create_custom_thread "CLEO/GANG_WARS_V3\HATE1.CS"  
                0AAA: 30@ = thread 'HATEG' pointer 
                if 
                    30@ == 0 
                then
                    0A92: create_custom_thread "CLEO/GANG_WARS_V3\HATEG.CS"
                end
            end
        end
        if 23@ == 5
        then
            0AAA: 31@ = thread 'HATE1' pointer 
            if 
                31@ == 0 
            then 
                0A92: create_custom_thread "CLEO/GANG_WARS_V3\HATE1.CS"  
            end
        end
        if 23@ == 6
        then
            0AAA: 30@ = thread 'HATEG' pointer 
            if 
                30@ == 0 
            then 
                0A92: create_custom_thread "CLEO/GANG_WARS_V3\HATEG.CS"
                0AAA: 33@ = thread 'WARS1' pointer
                if
                    33@ == 0
                then
                    0A92: create_custom_thread "CLEO/GANG_WARS_V3\WARS1.CS"
                    0ACD: show_text_highpriority "DECEASED GANG BOSS" time 9000
                end
            end
        end
        if 23@ == 7
        then
            0AAA: 31@ = thread 'HATE1' pointer 
            if 
                31@ == 0 
            then 
                0A92: create_custom_thread "CLEO/GANG_WARS_V3\HATE1.CS"  
                0A92: create_custom_thread "CLEO/GANG_WARS_V3\HATE1.CS"
                0AAA: 0@ = thread 'BOSS' pointer
                if
                    0@ == 0
                then
                    0A92: create_custom_thread "CLEO/GANG_WARS_V3\BOSS.CS"  
                    0ACA: show_text_box "~R~~H~FINISH BOSS GANG"
                end
            end 
        end
        if 23@ == 8
        then
            0AAA: 31@ = thread 'HATE1' pointer 
            0AAA: 30@ = thread 'HATEG' pointer 
            if and
                30@ == 0
                31@ == 0 
            then 
                0A92: create_custom_thread "CLEO/GANG_WARS_V3\HATE1.CS"  
                0A92: create_custom_thread "CLEO/GANG_WARS_V3\HATEG.CS"
            end
        end
    //end
end

:clean5
for 20@ = 0 to 239 step 4
    0A8E: 16@ = 18@ + 20@ // label offset + item offset
    0A8E: 17@ = 19@ + 20@ // label offset + item offset
    0A8D: 8@ = read_memory 16@ size 4 virtual_protect 0
    0A8D: 11@ = read_memory 17@ size 4 virtual_protect 0
    if 056D:   actor 8@ defined 
    then
        Actor.RemoveReferences(8@)
        wait 50
        actor.DestroyInstantly(8@)
    end
end
0661: NOP "CZYOA_WSZYSTKIE_SKlADNIKI" 
0AF1: write_int 1 to_ini_file "CLEO\GANG_WARS_V3\WARS_SET.INI" section "MODE5" key "KEY" 
0AF1: write_int 1 to_ini_file "CLEO\GANG_WARS_V3\WARS_SET.INI" section "MODE6" key "KEY" 
0AF1: write_int 1 to_ini_file "CLEO\GANG_WARS_V3\WARS_SET.INI" section "MODE9" key "KEY" 
0AF1: write_int 1 to_ini_file "CLEO\GANG_WARS_V3\WARS_SET.INI" section "MODE10" key "KEY" 
0ACD: show_text_highpriority "~R~~H~SCRIPT UNLOADING" time 9000
01F0: set_max_wanted_level_to 6 
end_thread

:actor
hex 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 

00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 

00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
end

:marker
hex 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 

00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 

00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
00 00 00 00 
end